package com.lanou3g.hw0518.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import java.util.HashSet;
import java.util.Set;

@WebListener
public class AppListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent se) {
        Set<String> loginUsers = new HashSet<>();
        ServletContext app = se.getServletContext();
        app.setAttribute("loginUsers",loginUsers);



    }

    @Override
    public void contextDestroyed(ServletContextEvent se) {

    }
}
